package com.scs.application.modules.finance.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.scs.application.core.entity.FlowEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "结算单表")
@TableName("finance_settlement")
public class Settlement extends FlowEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "会计期间",
            length = "20",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String period;

    @EntityFieldAnnotation(
            text = "期号外键",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String period_id;

    @JsonFormat(pattern="yyyy/MM/dd", timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "起始日期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date startDate;

    @JsonFormat(pattern="yyyy/MM/dd", timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "结束日期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date endDate;

    @EntityFieldAnnotation(
            text = "结算金额",
            length = "",
            not_null = true,
            default_value = "0.0000",
            comment = ""
    )
    private Double amount;


    @EntityFieldAnnotation(
            text = "结算单类型",
            length = "",
            not_null = true,
            default_value = "2",
            comment = "0：非一物一码；1：一物一码；2 全部"
    )
    private Integer busType;

    @EntityFieldAnnotation(
            text = "已同步至MSCM",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagSyncMscm;


    @EntityFieldAnnotation(
            text = "备注",
            length = "250",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

}
